<?php

class cps_mdl_userorderprofit extends dbeav_model {
    
    public $defaultOrder = 'profit_id DESC';

    
    public function __construct($app) {
        parent::__construct($app);
    }
    
//    
//    public function searchOptions() {
//        parent::searchOptions();
//    }
    
    
    public function getProfitByOrder($orderId, $aField = array('*')) {
        //组装需要获取的字段
        $strCols = implode(',', $aField);
        //根据订单id获取订单佣金详情
        $arrOrdProfit = $this->dump(array('order_id' => $orderId), $strCols);
        return $arrOrdProfit;
    }
    
    
    public function getProfitList($start, $end) {
        //根据时间段获取多条佣金信息
        $arrProfitList = $this->getList('*', array('addtime|than' => $start, 'addtime|lthan' => $end));
        return $arrProfitList;
    }
}